package com.itheima.string;

public class DemoEquals {
    public static void main(String[] args) {
        String s1 = "abc";
        String s2 = "ABC";
        String s3 = new String ("abc");
        System.out.println(s1.equals(s2));//比较字符串内容
        System.out.println(s1.equals(s3));//比较的是内容,不再是地址;
        System.out.println(s1.equalsIgnoreCase(s2));//比较字符串内容,忽略大小写!
        // 常用于验证码的比对
    }
}